<template>
	<view>
		<uni-nav-bar shadow title="" @clickLeft="back" height="88rpx" :border="false" :fixed="true"
			backgroundColor="#FFFFFF" :shadow="false" left-icon="left"></uni-nav-bar>
		<view class="container" v-html="content">
			<!-- 			<view class="bigTitle">
				<text class="t2">加盟合作介绍</text>
			</view>
			<view class="bigTitle bigTitle2">
				<text class="t2">Join in cooperation</text>
			</view>
			
			<view class="bigTitle bigTitle3">
				<text class="t2">我们是专注青少年茶文化传播与现代教学结合的领航者
我们有什么？
加盟我们你将获得什么？
目前和那些品牌（校园）合作....</text>
			</view>
			<view class="bigTitle list">
				电话：<text class="t2">13823754964 （钟老师）</text>
			</view>
			<view class="bigTitle list">
				QQ：<text class="t2">532111683</text>
			</view>
			<view class="bigTitle list">
				邮箱：<text class="t2">532111683@qq.com</text>
			</view>
 -->
		</view>
	</view>
</template>

<script>
	import jssdk from '@/common/libs/jssdk';
	import share from '@/shopro/share/index.js'
	export default {
		data() {
			return {
				id: '',
				content: ''
			}
		},
		onReady() {
			this.getData()
		},
		onLoad: function(option) {
			const id = option.id;
			this.id = id;
		},
		methods: {
			back() {
				uni.navigateBack({
					delta: 1
				})
			},
			getData() {
				this.$api.get({
					url: '/resource/info?resource_id=' + this.id,
					success: res => {
						console.log(res);
						this.content = res.content;
						// 分享
						let shareId = uni.getStorageSync('userInfo').id
						let res1 = share.setShareInfo({
							title: res.name,
							desc: '',
							image: res.image,
							params: {
								page: 2,
								pageId: this.id,
								shareId: shareId
							}
						});
						let url = window.location.href
						// .split('&')
						// let link = url[0] + url[1] + url[2] + '&isShare=true&userid=' + shareId + '&' + res1
						// 	.query
						jssdk.share({
							title: res.name,
							desc:'',
							// link:encodeURIComponent(link),
							link: url,
							imgUrl: res.image,
					
						})
					},
					fail: error => {
						console.log(error)
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.container {
		padding: 28rpx 30rpx 0;

		.bigTitle {
			padding: 0 30rpx;
			font-size: 49rpx;
			font-family: PingFang SC;
			line-height: 60rpx;
			color: #333333;
			opacity: 1;
		}

		.bigTitle2 {
			padding-bottom: 25rpx;
		}

		.bigTitle3 {
			padding-bottom: 30rpx;
			font-size: 26rpx;
			line-height: 39rpx;
		}

		.list {
			font-size: 26rpx;
			font-weight: 500;
			line-height: 39rpx;
			color: #333333;
			opacity: 1;

			.t2 {
				font-weight: normal;
			}
		}
	}
</style>
